package InterpretMod;

import InterpretMod.code.Context;
import InterpretMod.code.CopyViewExpression;
import InterpretMod.code.MoveTableExpression;

// 客户端
public class Client {

    public static void main(String[] args) {
        code code = new code();
        Context context = code.new Context();

        // 注册表达式
        context.addExpression("COPY VIEW", code.new CopyViewExpression("srcDB", "desDB"));
        context.addExpression("MOVETABLE", code.new MoveTableExpression("Student", "srcDB", "desDB"));

        // 执行命令
        context.executeCommand("COPY VIEW FROM srcDB TO desDB");
        context.executeCommand("MOVETABLE Student FROM srcDB TO desDB");
    }
}
